using System.Threading.Tasks;
using FytSoa.Application.Sys;
using FytSoa.Domain.Core.Result;

namespace FytSoa.Application.Operator
{
    /// <summary>
    /// 操作人-登录人
    /// </summary>
    public interface IOperatorService:IApplicationService
    {
        /// <summary>
        /// 是否认证
        /// </summary>
        bool IsAuthorize { get; }

        /// <summary>
        /// 获得登录人
        /// </summary>
        OperatorUser User { get; }
        
        /// <summary>
        /// 登录
        /// </summary>
        /// <param name="loginParam"></param>
        /// <returns></returns>
        Task<ApiResult<LoginTokenDto>> LoginAsync(LoginParam loginParam);

        /// <summary>
        /// 查询登录人信息
        /// </summary>
        /// <returns></returns>
        Task<ApiResult<OperatorUser>> UserInfo();

        /// <summary>
        /// 退出
        /// </summary>
        /// <returns></returns>
        ApiResult<int> Logout();
    }
}